package com.zy.dp.strategy.example4;

public class LogContext
{
	public void log(String msg)
	{

		LogStrategy strategy = new DbLog();

		try
		{
			strategy.log(msg);
		}
		catch (Exception e)
		{
			strategy = new FileLog();
			strategy.log(msg);
		}

	}
}
